[5.x] Attempt #3 to fix the playwright tests#1227
Merged
Conversation
daa14e9 to
28f6e0e
Compare
777c88d to
811bc69
Compare
a337562 to
2b45881
Compare
indykoning
approved these changes
Mar 18, 2026
royduin
reviewed
Mar 20, 2026
| async loadLazy() { | ||
| await this.page.waitForLoadState('networkidle') | ||
| await this.page.evaluate(() => window.$emit('load-lazy')) | ||
| await this.page.waitForTimeout(250) |
Member
There was a problem hiding this comment.
Can we get rid of these timeouts?
Collaborator
Author
There was a problem hiding this comment.
No. The whole issue with images not being loaded in is because these timeouts were missing. I had a low timeout at first, but then it was semi-random when images loaded in or not. This was the only consistent solution.
Merged
Member
|
Let's see how this turns out, merging |
Member
|
Could you add some more information? What, why, etc? |
Closed
Collaborator
Author
|
I've updated the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref: RAP-1864
The playwright tests were failing left and right because, apparently, the scrolling caused very small movements of elements in certain browsers (especially on mobile). It also caused the masks (e.g. over the copyright year) to sometimes be misaligned. This made the tests unreliable.
By replacing the scroll with code that directly loads in any lazily loaded things, we don't need to worry about scroll-related issues. This also meant implementing a trick that makes sure every lazily-loaded image gets loaded, and moving some timeouts around to make sure all the browsers wait enough time for all of the lazy components.